﻿using System;

namespace Model
{
    public class Material
    {
        // 材料 ID（主键）
        public int MaterialId { get; set; }

        // 材料类型
        public string MaterialType { get; set; }

        // 详细材料类型
        public string DetailedMaterialType { get; set; }

        // 数量
        public int? Quantity { get; set; }

        // 材料单位
        public string MaterialUnit { get; set; }

        // 材料描述
        public string MaterialDescription { get; set; }

        // 消耗扣除
        public string ConsumptionDeduction { get; set; }

        // 材料组号
        public string MaterialGroupNumber { get; set; }

        // 构造函数
        public Material()
        {
            // 可以在构造函数中初始化一些默认值
        }
        public class History
        {
            public int HistoryId { get; set; }
            public int MaterialId { get; set; }
            public string ChangeType { get; set; }
            public DateTime ChangeTime { get; set; }

            // 修复：统一使用"Old"和"New"前缀
            public string OldMaterialType { get; set; }
            public string NewMaterialType { get; set; }
            public string OldDetailedMaterialType { get; set; }
            public string NewDetailedMaterialType { get; set; }
            public int? OldQuantity { get; set; }
            public int? NewQuantity { get; set; }
            public string OldMaterialUnit { get; set; }
            public string NewMaterialUnit { get; set; }
            public string OldMaterialDescription { get; set; }
            public string NewMaterialDescription { get; set; }
            public string OldConsumptionDeduction { get; set; }
            public string NewConsumptionDeduction { get; set; }
            public string OldMaterialGroupNumber { get; set; }
            public string NewMaterialGroupNumber { get; set; }
        }
    }
}
